﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DriveBeamEditor.Controls.BeamNG.VehiclePartConfig;

namespace DriveBeamEditor.Controls.BeamNG
{
    public partial class VehiclePartConfigControl : VehiclePartControl
    {
        #region CTORs

        public VehiclePartConfigControl()
        {
            InitializeComponent();
        }

        #endregion

        #region Methods

        public override string ToString()
        {
            return "General information";
        }

        public override void UpdateUI(Control parent = null)
        {
            // let child controls do their respective jobs
        }

        protected override void OnVehiclePartChanged()
        {
            vehiclePartInfo.VehiclePart = VehiclePart;
            vehiclePartGlobal.VehiclePart = VehiclePart;
            vehiclePartSlots.VehiclePart = VehiclePart;

            base.OnVehiclePartChanged();
        }

        //public override void RefreshData()
        //{
        //    base.RefreshData();

        //    vehiclePartInfo.RefreshData();
        //    vehiclePartGlobal.RefreshData();
        //    vehiclePartSlots.RefreshData();
        //}

        #endregion
    }
}
